home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / PowerPlant / Multi-Panel Dialogs 1.1 / MPD Sources / CMPDPanelSelectTable.h < prev    next >
Encoding:
Text File  |  1996-09-09  |  2.3 KB  |  69 lines  |  [TEXT/R*ch]

  1. // ===========================================================================
  2. //    File:                        CMPDPanelSelectTable.h
  3. // Version:                    1.0 - Feb 1, 1996
  4. //    Author:                    Mike Shields (mshields@inconnect.com)
  5. //                            
  6. //    Copyright ©1996 Mike Shields. All rights reserved.
  7. // ===========================================================================
  8. //    CMPDPanelSelectTable.cp        <- double-click + Command-D to see class definition
  9. //
  10. // Displays a scrolling list of icons and title strings. Also acts 
  11. // like a control and broadcasts a hit message when an item changes.
  12.  
  13. #pragma once
  14.  
  15. #include <LTableView.h>
  16. #include <LCommander.h>
  17. #include "CMPDPanelSelectControl.h"
  18. #include "CTargetable.h"
  19.  
  20. class    CMPDPanelSelectTable : public LTableView,
  21.                                         public LCommander,
  22.                                         public CMPDPanelSelectControl,
  23.                                         public CTargetable
  24. {
  25. public:
  26.     enum { class_ID = 'MPDt' };
  27.     static CMPDPanelSelectTable*
  28.                             CreateFromStream(LStream *inStream);
  29.     
  30.                             CMPDPanelSelectTable();
  31.                             CMPDPanelSelectTable(const SPaneInfo &inPaneInfo,
  32.                                                     const SViewInfo &inViewInfo, ResIDT inTextTraitsID);
  33.                             CMPDPanelSelectTable(LStream *inStream);
  34.     virtual                ~CMPDPanelSelectTable();
  35.  
  36.     virtual void        SelectionChanged(void);
  37.     virtual Boolean    HandleKeyPress(const EventRecord &inKeyEvent);
  38.     virtual void        DoNavigationKey(const EventRecord&inKeyEvent);
  39.     virtual Boolean    ObeyCommand(CommandT inCommand, void* ioParam);
  40.     virtual void        InsertPanelIDs(MPDPtr inPanelIDData);
  41.     virtual void        SelectPanelID(PanelIDIndexT inPanelID);
  42.  
  43.     virtual void        ScrollCellIntoFrame(const STableCell &inCell);
  44.     virtual void        HiliteSelection(Boolean inActively, Boolean inHilite);
  45.  
  46. protected:
  47.     virtual void        ClickSelf(const SMouseDownEvent &inMouseDown);
  48.     virtual void        DrawCell(const STableCell &inCell, const Rect &inLocalRect);
  49.     virtual void        DrawCellSelf(const STableCell &inCell, const Rect &inLocalRect,
  50.                                             Boolean inHilite);
  51.     virtual void        HiliteCellActively(const STableCell &inCell,
  52.                                                     Boolean inHilite);
  53.     virtual void        HiliteCellInactively(const STableCell &inCell,
  54.                                                         Boolean inHilite);
  55.  
  56.     virtual PanelIDIndexT    
  57.                             GetCurrentPanelID(void) const;
  58.     virtual void        BeTarget(void);
  59.     virtual void        DontBeTarget(void);
  60.             
  61.     ResIDT                mTextTraitsID;
  62. };
  63.  
  64. struct    SIconTableRec 
  65. {
  66.     ResIDT    iconID;
  67.     Str15        name;
  68. };
  69.